package com.thingsgrid.workorder.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.thingsgrid.desk.vo.NoticeVO;
import com.thingsgrid.workorder.entity.ProcessWorkOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Mapper 接口
 *
 * @author MQ
 */
public interface WorkOrderMapper extends BaseMapper<ProcessWorkOrder> {
    /**
     * 分页查询工单列表
     * @param page
     * @param processWorkOrder
     * @param list
     * @return
     */
    List<ProcessWorkOrder> selectWorkOrderPage(IPage page, @Param("processWorkOrder") ProcessWorkOrder processWorkOrder,@Param("list") List<String> list);

    /**
     * 通过id获取工单
     * @param id
     * @return
     */
    ProcessWorkOrder findByid(@Param("id") String id);
    /**
     * 批量更新工单
     * @param processWorkOrders
     * @return
     */
    int updateBatch(@Param("list") List<ProcessWorkOrder> processWorkOrders);

    /**
     * 通过类型查看用户组
     * @param orderType
     * @return
     */
    Map findUserGroupByType(@Param("orderType") String orderType);
}
